package com.example.demo.controller;

import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/test")
public class TestController {

    @RequestMapping(value="sayhi",method = RequestMethod.GET)
    public String sayHi() {
        return "你好 Spring MVC";
    }

    @GetMapping("/sayhi2")
    public String sayHi2() {
        return "你好 Spring MVC2";
    }

    @PostMapping("/sayhi3")
    public String sayHi3() {
        return "你好 Spring MVC3";
    }
}
